home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Loadstar 128 10
/
q10.d81
/
t.shell asm
< prev
next >
Wrap
Text File
|
2022-08-28
|
20KB
|
496 lines
L O A D S T A R 1 2 8 E D I T O R / A S S E M B L E R
by Robert Rockefeller
The Loadstar 128 Editor/Assembler package is a necessary tool for
writing machine language. You must know how to do it already -- this will
not teach you -- but it will make it a LOT easier. This article will only
document the assembler/editor features.
The editor, named "COM.EDT", and the assembler, named "COM.ASM", are
designed to be used in conjunction with the shell program published on this
issue of LOADSTAR. Execute the shell program by typing RUN"128 SHELL" then
type RETURN.
EDITOR
------
The editor is a full-screen programmer's text editor which creates PET
ASCII program files. A programmer's text editor differs from a
wordprocessor in that it typically cannot format and print out text files.
It's for editing code only.
After the shell is loaded, you execute the editor by typing EDT then
RETURN. A file can be specified for editing by following EDT with a
filename. For example, if EDT "ASM.COPY is executed the editor will be
loaded, then the text file "ASM.COPY" will automatically be loaded into the
editor from disk device 8. An alternate device number for the text file can
be specified by prefixing it to the filename. For example, EDT 9,"ASM.COPY
would try to load "ASM.COPY" from device 9.
EDT can work on files completely in RAM by specifying EDT RAM instead of
a filename. Typically you would use EDT to create a text file to be
assembled. You would then exit the editor and assemble the file with ASM.
You could then type EDT RAM to re-edit the text already in RAM without the
necessity of loading the text in from disk. Of course you must be sure that
the text has not been corrupted in any way in the meantime. Therefore avoid
loading in BASIC programs between uses of EDT if you wish to use the RAM
option. It is also a good idea to save a copy of your source code to disk
after making changes just in case.
EDT files are suitable for use by the "COM.SUBMIT" program published
with the shell program. SUBMIT allows you to execute text in "SUB." files as
if the text were entered at the keyboard. You can use "SUB." files to
redefine the function keys, RUN BASIC programs, control the assembler, etc.
If you're familiar with MS DOS, think of "SUB." files as "batch" files.
Some keyboard conventions are used when explaining EDT functions. F1 @
means type the F1 key and release it, then type the @ key and release it. A
slash (/) is used to show that two keys are to be pressed simultaneously.
SHIFT/RETURN means press a SHIFT key and the RETURN key at the same time.
EDT functions are explained below.
ESC 1 - Set the text color.
ESC 2 - Set the screen color.
ESC @ - Clear text from the cursor position to the end of the file.
ESC a - Turn insert mode on.
ESC c - Turn insert mode off.
ESC d - Erase the whole line.
ESC g - Enable bell ringing for errors.
ESC h - Disable bell ringing for errors.
ESC j - Move the cursor to the start of the line.
ESC k - Move the cursor to the end of the line.
ESC n - Set the screen to normal (non-reversed) mode.
ESC p - Erase to the start of the line.
ESC q - Erase to the end of the line.
ESC r - Set the screen to reversed mode.
ESC v - Scroll the screen up.
ESC w - Scroll the screen down.
F1 @ - Read the disk error channel, or issue a disk command. Type F1 @
RETURN to read the error channel of the default disk drive. To read some
other device enter a device number followed by a comma. For example type F1
@ 9, RETURN to read the error channel of device 9. To issue a disk command
just type F1 @ then type the command at the prompt, and type RETURN. To
send a command to a device other than the default device number, just prefix
the device number to the command. For example, typing F1 @ 9,i0 RETURN
would initialize disk device 9.
F1 d - Set the default disk device number. The default disk device number
is always displayed as the number at the extreme left of the status line.
F1 m - Display the number of free bytes available for text storage.
F1 s - Search for a string. Just enter the string at the prompt and type
RETURN.
F1 e - Save the editor to disk. First select the screen colors you like
with ESC 1 and ESC 2, then type F1 e, then enter the disk device number to
which you wish to save the editor, then type RETURN.
F1 r - Replace a string. First enter the string to be replaced, then enter
the string to replace with. Finally, if you wish to be prompted before each
replacement type y at the PROMPT BEFORE REPLACING? prompt, else type n.
F1 v - Display a text file on disk. Enter the name of the file you wish to
view then type RETURN. The file will be printed to the screen. To view
from a disk other than the default disk you prefix a device number to the
filename. For example, if you enter a filename of 9,ERR.COPY the file
"ERR.COPY" would be displayed from device 9.
F1 b - Exit the editor. Return to the BASIC environment.
RETURN - Start a new line. Inserts a carriage-return character into the
text area. Any text to the right of the cursor will be moved to the next
line when RETURN is typed.
CONTROL/p - Insert the text buffer at the cursor position. Text can be
copied into the text buffer by marking a block (see SHIFT/F7) then typing c.
SHIFT/HOME - Clear all text. You must type y at the prompt before text is
actually cleared.
HELP - Display help screens.
DEL - Delete the character to the left of the cursor.
CRSR keys - Work as you would expect them to.
down-arrow - Scroll the screen down one row.
up-arrow - Scroll the screen up one row.
HOME up-arrow - Move the cursor to the top, left corner of the screen.
HOME down-arrow - Move the cursor to the bottom, left corner of the screen.
HOME left-arrow - Move the cursor to the start of the text area.
HOME right-arrow - Move the cursor to the end of the text.
HOME cursor-down - Goto a specified line number. Type the number of the
line you wish to go to, then type RETURN.
F3 - Display a disk directory. Enter the device number of the disk you wish
to view.
F5 - Save the text to a disk drive. Enter the filename at the prompt. To
save to a disk other than the default disk you prefix a device number to the
filename. For example, if you enter a filename of 9,SUB.KEYS the text would
be saved to disk device 9 with the name "SUB.KEYS".
F7 - Delete the character under the cursor.
F2 - Load a file. Enter the name of the file you wish to load. To load
from a disk other than the default you prefix a device number to the
filename. For example, if you enter a filename of 9,SUB.KEYS the file
"SUB.KEYS" would be loaded from device 9.
F4 - Search ahead for the next occurrence of the last string searched for.
F8 - Begin marking a text block. Move the cursor to the other end of the
block. The block is displayed in reverse field as the cursor is moved.
After the block is marked there are three operations that can be performed
on the block.
Type s to save the block to disk.
Type c to copy the block to the text buffer. The block can be inserted
into the text area with CONTROL/p.
Type DEL to delete the block. The block is copied to the text buffer
before deletion. The block can be recovered with CONTROL/p.
ASSEMBLER
---------
The assembler is executed by typing ASM and the name of a file to
assemble, then RETURN. For example, if ASM "COPY is executed the assembler
will be loaded, then the source file "ASM.COPY" will be assembled. All
assembler source files must have ASM. as the first four characters of their
filenames. However, leave off the ASM. prefix when specifying filenames
for the assembler. The assembler automatically adds ASM. to each filename.
ASM can assemble files completely in RAM by specifying ASM RAM instead
of a filename. Typically you would use EDT to create a text file to be
assembled. You would then exit the editor, and type ASM RAM to assemble the
text already in memory without the necessity of loading the text in from
disk. If you load in a BASIC program in the meantime, however, the
assembler may hav